{include file='header.tpl'}
{include file='admin/leftcol.tpl'}
<div id="left-area">
    <span class="td4">
        <div class="breadcrumb">
            <span class="raquo"></span><a href="/">Главная</a>
            <span class="raquo"> &raquo; </span><a href="{geturl controller="admin" action="index"}">Админ панель</a>  
            <span class="raquo"> &raquo; </span><a href="{geturl controller='admin' action='help'}">Помощь</a>
            {if $cat->getParent()}
                <span class="raquo"> &raquo; </span><a href="{geturl route='viewhelpcat' id=$cat->_parent->getId()}">{$cat->_parent->name}</a>
            {/if}
            <span class="raquo"> &raquo; </span><a href="{geturl route='viewhelpcat' id=$cat->getId()}">{$cat->name}</a> 
        </div>
        <h1 class="category-title">Помощь :: {$cat->name}</h1>

        <a href="{geturl route='addhelppage' cat=$cat->getId()}" class="button pink" >Добавить страницу</a>
        <br />
        <br />
        <table width="100%">
            <tr>
                <th>
                    Название
                </th>
                <th>
                    Ссылка
                </th>
                <th>
                    Действие
                </th>
            </tr>
            {foreach from=$pages item='page'}
                <tr>
                    <td><a href="{geturl route='helppage' alias=$page->alias}" target="_blank">{$page->name}</a></td>
                    <td>{$page->alias}</td>
                    <td>
                        <a href="{geturl route='edithelppage' cat=$page->cat_id id=$page->getId()}"><img src="/images/index-14.png" /></a>
                        <a href="{geturl route='deletehelppage' cat=$page->cat_id id=$page->getId()}"><img src="/images/index-07.png" /></a>
                    </td>
                </tr>
            {foreachelse}
                <tr><td colspan="2">Нет страниц в данной категории</td></tr>
            {/foreach}
        </table>
        <br />
        <br />
        <a href="{geturl route='addhelppage' cat=$cat->getId()}" class="button pink" >Добавить страницу</a>
    </span>
</div>
{include file='footer.tpl'}